/**
 * This class is designed to be packaged with a COM DLL output 
 * format. The class has no standard entry points other than the 
 * constructor. Public methods are exposed as methods on the 
 * default COM interface. 
 * @com.register ( clsid=DB379AA0-D639-11D2-BB51-006097B5EAFC, typelib=DB379AA1-D639-11D2-BB51-006097B5EAFC )
 */
import com.ms.com.*;

/**
 * @com.register ( clsid=2652CA66-D6CF-11D2-BB51-006097B5EAFC, typelib=2652CA65-D6CF-11D2-BB51-006097B5EAFC )
 */
public class InsideCOM implements component.ISum
{
    // TODO: Add additional methods and code here
    public int Sum(int x, int y)
    {
        if(x < 0 || y < 0)
            throw new ComFailException(0x80070057, 
                "Negative numbers not allowed");
        return x + y;
    }

    /**
     * NOTE: To add auto-registration code, refer to the 
     * documentation on the following method:
     *   public static void onCOMRegister(boolean unRegister) {}
     */
}
